
import java.util.Scanner;
/*
 * 
 * @author kulwinder kaur
 * Jan 20, 2013
 * */
 

public class ModifyClassifyTriangle {

	
	public static void main(String[] args) {
		Scanner input= new Scanner(System.in);
	
	
		  double x,y,z;
		  		 
		  System.out.print("Enter the sides x, y, z of triangle:");
		  x=input.nextDouble();
		  y=input.nextDouble();
		  z=input.nextDouble();
		  	  
		//ruling out zero and negative values 
		  
		  if(x<=0 || y<= 0 || z<= 0){
			  
			  System.out.println("These are not valid values because sides cannot be zero or negative");
		  
			  System.exit(0);
		  }
			
		//check triangle properties	
		 else  if(((x+y)<=z) || ((y+z)<=x) || ((x+z)<=y))
		   {
			 System.out.println("The triangle is not valid because sum of two sides is less than third side");
		  
		       System.exit(0);
		   }
			  
		  //checking type of triangle
		  if((x==y) && (y==z))
			  {
				  System.out.println("The triangle is equilateral");
			  } 
			  else if((x==z) || (y==z) || (x==y))
			  {
				  System.out.println("The triangle is isoseles");
			  }
			  else
			  {
				  System.out.println("The triangle is scalene");
			  }
		  
	    if(((x*x) + (y*y) == (z*z)) || ((y*y)+ (z*z) == (x*x)) || ((z*z) + (x*x) == (y*y))){
			  
			 System.out.println("The triangle is right triangle");
	    }
		else{
				   System.out.println("The triangle is not a right triangle");
			  			  
		    } 
		  
			
	  }

}
		
	  

	

